
const reportreducer = (state = [],action) => {

    switch(action.type){
        case 'GET_REPORT':
            console.log(action.reportlist)
            return action.reportlist;
        case 'DEL_REPORT':
            let arr
            arr = [...state].filter((item) => {
                return item.report_id != action.index
            })
            return arr
        default:
            return state;
    }
}

export default reportreducer;